import request from '@/utils/request'


const api_name = `/api/hospital/hospital` 

export default {
    //查询医院列表
    findHospitalList(page, limit, searchObj){
        return request({
            url: `${api_name}/findHospitalList/${page}/${limit}`,
            method: 'get',
            params: searchObj
        })
    },

    //根据医院名称获取医院列表
    findByHospitalName(hosname){
        return request({
            url: `${api_name}/findByHospitalName/${hosname}`,
            method: 'get'
        })
    },
    
    //根据医院编号查询医院详情
    show(hoscode) {
        return request({
            url: `${api_name}/getHospitalDetail/${hoscode}`,
            method: 'get'
        })
    },
    //根据医院编号查询科室信息
    findDepartment(hoscode) {
        return request({
            url: `${api_name}/getDepartmentList/${hoscode}`,
            method: 'get'
        })
    },


    //获取可预约排班数据
    getBookingScheduleRule(page, limit, hoscode, depcode) {
        return request({
            url: `${api_name}/auth/getBookingScheduleRule/${page}/${limit}/${hoscode}/${depcode}`,
            method: 'get'
        })
    },
    //获取排班数据   
    findScheduleList(hoscode, depcode, workDate) {
        return request({
            url: `${api_name}/auth/findScheduleList/${hoscode}/${depcode}/${workDate}`,
            method: 'get'
        })
    },
    //根据科室Id查询科室信息
    getSchedule(id) {
        return request({
          url: `${api_name}/getSchedule/${id}`,
          method: 'get'
        })
    },
}